import request from '@/utils/request'

// 查询菜谱用料明细列表
export function listIngredients(query) {
  return request({
    url: '/recipes/ingredients/list',
    method: 'get',
    params: query
  })
}

// 查询菜谱用料明细详细
export function getIngredients(id) {
  return request({
    url: '/recipes/ingredients/' + id,
    method: 'get'
  })
}

// 新增菜谱用料明细
export function addIngredients(data) {
  return request({
    url: '/recipes/ingredients',
    method: 'post',
    data: data
  })
}

// 修改菜谱用料明细
export function updateIngredients(data) {
  return request({
    url: '/recipes/ingredients',
    method: 'put',
    data: data
  })
}

// 删除菜谱用料明细
export function delIngredients(id) {
  return request({
    url: '/recipes/ingredients/' + id,
    method: 'delete'
  })
}
